#pragma once

#include <deque>
#include <string>
#include <iostream>
using namespace std;


namespace uppg31
{
	class palindrom
	{
	private:
		deque<char> queue;
		deque<char> stack;
	public:

		palindrom()
		{
		}

		palindrom(string s)
		{
			for (int i = 0; i < s.length(); i++)
			{
				queue.push_back(s[i]);
				stack.push_front(s[i]);
			}
		}

		~palindrom()
		{
		}

		bool test()
		{
			if (queue.empty())
			{
				return true;
			}
			else if (queue.front() == stack.front())
			{
				queue.pop_front();
				stack.pop_front();
				return test();
			}
			else
			{
				return false;
			}
		}
	};
}

